

import { Component, OnInit, OnDestroy } from '@angular/core';
import {MessagesService} from '../../../services/messages.service';
import {BreadcrumbService} from '../../../services/breadcrumb.service';
import {Message} from '../../../models/message';
import {User} from '../../../models/user';

@Component({
  selector: 'app-user-admin',
  styleUrls: ['./user-admin.component.css'],
  templateUrl: './user-admin.component.html'
})
export class UserAdminComponent implements OnInit, OnDestroy {
  public date: Date = new Date();
  public optFlag;
  public curUser: User;
  public filterByRole = false;
  public userKeyword = '';
  public tab = 'menu';
  text: string;
  values1: string[];

  constructor(
    private msgServ: MessagesService,
    private breadServ: BreadcrumbService,
  ) {
  }

  public ngOnInit() {
    // setttings the header for the home
    this.breadServ.setCurrent({
      description: 'HomePage',
      display: false,
      header: 'Dashboard',
      levels: [
        {
          icon: 'dashboard',
          link: ['/'],
          title: 'Home'
        }
      ]
    });

  }

  public ngOnDestroy() {
    // removing the header
    this.breadServ.clear();
  }

}
